home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / console / splitvt-.000 / splitvt- / splitvt-1.6.1 / vt102.codes < prev    next >
Encoding:
Text File  |  1994-11-17  |  10.1 KB  |  387 lines

  1.  
  2. Escape codes for vt102 terminal. <kivinen@hut.fi>
  3.  
  4. All numbers below are octal.<n> means numeric value,<c> means character string.
  5. If <n> is missing it is 0 or in cursor movements 1.
  6.  
  7. Reset and set modes
  8.   Set Modes
  9.     Esc  [ <c> ; ... ; <c> h
  10.     033 133   073   073   150
  11.   Reset Modes
  12.     Esc  [ <c> ; ... ; <c> l
  13.     033 133   073   073   154
  14.  
  15.   Where <c> is
  16.     '2'= Lock keyboard (set); Unlock keyboard (reset)
  17.     '4'= Insert mode (set); Replace mode (reset)
  18.    '12'= Echo on (set); Echo off (reset)
  19.    '20'= Return = CR+LF (set); Return = CR (reset)
  20.    '?1'= Cursorkeys application (set); Cursorkeys normal (reset)
  21.    '?2'= Ansi (set); VT52 (reset)
  22.    '?3'= 132 char/row (set); 80 char/row (reset)
  23.    '?4'= Jump scroll (set); Smooth scroll (reset)
  24.    '?5'= Reverse screen (set); Normal screen (reset)
  25.    '?6'= Sets relative coordinates (set); Sets absolute coordinates (reset)
  26.    '?7'= Auto wrap (set); Auto wrap off (reset)
  27.    '?8'= Auto repeat on (set); Auto repeat off (reset)
  28.   '?18'= Send FF to printer after print screen (set); No char after PS (reset)
  29.   '?19'= Print screen prints full screen (set); PS prints scroll region (reset)
  30.   '?25'= Cursor on (set); Cursor off (reset) 
  31.  
  32. Set scrolling region (n1=upper,n2=lower)
  33.   Esc  [ <n1> ; <n2> r
  34.   033 133    073    162
  35.  
  36.  
  37. Cursor movement (<n>=how many chars or lines), cursor stop at margin.
  38.   Up
  39.     Esc  [ <n> A
  40.     033 133   101
  41.   Down
  42.     Esc  [ <n> B
  43.     033 133   102
  44.   Right
  45.     Esc  [ <n> C
  46.     033 133   103
  47.   Left
  48.     Esc  [  n  D
  49.     033 133   104
  50.   Cursor position  (<n1>=y,<n2>=x, from top of screen or scroll region)
  51.        Esc  [ <n1> ; <n2> H
  52.        033 133    073    110
  53.     Or Esc  [ <n1> ; <n2> f
  54.        033 133    073    146
  55.   Index (cursor down with scroll up when at margin)
  56.     Esc  D
  57.     033 104
  58.   Reverse index (cursor up with scroll down when at margin)
  59.     Esc  M
  60.     033 115
  61.   Next line (CR+Index)
  62.     Esc  E
  63.     033 105
  64.   Save cursor and attribute
  65.     Esc  7
  66.     033 067
  67.   Restore cursor and attribute
  68.     Esc  8
  69.     033 070
  70.  
  71.  
  72. Keybad character selection
  73.   Application keypad mode
  74.     Esc  =
  75.     033 075
  76.   Numeric keypad mode
  77.     Esc  >
  78.     033 076
  79.  
  80.   Keypadkeys codes generated
  81.                   Numeric      Application                VT52 Application
  82.     0             0 (060)      Esc O p (033 117 160)      Esc ? p (033 077 160)
  83.     1             1 (061)      Esc O q (033 117 161)      Esc ? q (033 077 161)
  84.     2             2 (062)      Esc O r (033 117 162)      Esc ? r (033 077 162)
  85.     3             3 (063)      Esc O s (033 117 163)      Esc ? s (033 077 163)
  86.     4             4 (064)      Esc O t (033 117 164)      Esc ? t (033 077 164)
  87.     5             5 (065)      Esc O u (033 117 165)      Esc ? u (033 077 165)
  88.     6             6 (066)      Esc O v (033 117 166)      Esc ? v (033 077 166)
  89.     7             7 (067)      Esc O w (033 117 167)      Esc ? w (033 077 167)
  90.     8             8 (070)      Esc O x (033 117 170)      Esc ? x (033 077 170)
  91.     9             9 (071)      Esc O y (033 117 171)      Esc ? y (033 077 171)
  92.     - (minus)     - (055)      Esc O m (033 117 155)      Esc ? m (033 077 155)
  93.     , (comma)     , (054)      Esc O l (033 117 154)      Esc ? l (033 077 154)
  94.     . (period)    . (056)      Esc O n (033 117 156)      Esc ? n (033 077 156)
  95.     Enter         CR (015)*    Esc O M (033 117 115)      Esc ? M (033 077 115)
  96.     PF1           Esc O P      Esc O P (033 117 120)      Esc P (033 120)
  97.     PF2           Esc O Q      Esc O Q (033 117 121)      Esc Q (033 121)
  98.     PF3           Esc O R      Esc O R (033 117 122)      Esc R (033 122)
  99.     PF4           Esc O S      Esc O S (033 117 123)      Esc S (033 123)
  100.   * Or CR+LF (015 012)
  101.  
  102.   Cursorkeys codes generated (changed by set and reset modes '?1')
  103.           normal         application
  104.     Up    Esc  [   A     Esc  O   A
  105.           033 133 101    033 117 101
  106.     Down  Esc  [   B     Esc  O   B
  107.           033 133 102    033 117 102
  108.     Right Esc  [   C     Esc  O   C
  109.           033 133 103    033 117 103
  110.     Left  Esc  [   D     Esc  O   D
  111.           033 133 104    033 117 104
  112.  
  113.  
  114. Select chaacter set
  115.   UK as G0
  116.     Esc  (   A
  117.     033 050 101
  118.   US as G0
  119.     Esc  (   B
  120.     033 050 102
  121.   Special characters and line drawing character set as G0
  122.     Esc  (   0
  123.     033 050 060
  124.   Alternate ROM as G0
  125.     Esc  (   1
  126.     033 050 061
  127.   Alternate ROM special characters character set as G0
  128.     Esc  (   2
  129.     033 050 062
  130.  
  131.   UK as G1
  132.     Esc  )   A
  133.     033 051 101
  134.   US as G1
  135.     Esc  )   B
  136.     033 051 102
  137.   Special characters and line drawing character set as G1
  138.     Esc  )   0
  139.     033 051 060
  140.   Alternate ROM as G1
  141.     Esc  )   1
  142.     033 051 061
  143.   Alternate ROM special characters character set as G1
  144.     Esc  )   2
  145.     033 051 062
  146.  
  147.   Selects G2 for one character
  148.     Esc  N
  149.     033 115
  150.   Selects G3 for one character
  151.     Esc  O
  152.     033 117
  153.  
  154.  
  155. Set graphic rendition
  156.   Esc  [ <n> ; <n> m
  157.   033 133   073   156
  158.  
  159.   Where <n> is
  160.    0 = Turn off attributes
  161.    1 = Bold (Full)
  162.    2 = Half
  163.    4 = Underline
  164.    5 = Blink
  165.    7 = Reverse
  166.   21 = Normal intensity
  167.   22 = Normal intensity
  168.   24 = Cancel underlined
  169.   25 = Cancel blinking
  170.   27 = Cancel reverse
  171.  
  172. Tab stops
  173.   Set horizontal tab
  174.     Esc  H
  175.     033 110
  176.   Clear horizontal tab
  177.        Esc  [   g
  178.        033 133 147
  179.     Or Esc  [   0   g
  180.        033 133 060 147
  181.   Clear all horizontal tabs
  182.     Esc  [   3   g
  183.     033 133 063 147
  184.  
  185.  
  186. Line attributes
  187.   Double-height
  188.     Top half
  189.       Esc  #   3
  190.       033 043 063
  191.     Bottom half
  192.       Esc  #   4
  193.       033 043 064
  194.   Single-width, single-height
  195.     Esc  #   5
  196.     033 043 065
  197.   Double-width
  198.     Esc  #   6
  199.     033 043 066
  200.  
  201.  
  202. Erasing
  203.   Erase in line
  204.     End of line (including cursor position)
  205.          Esc  [   K
  206.          033 133 113
  207.       Or Esc  [   0   K
  208.          033 133 060 113
  209.     Beginning of line (including cursor position)
  210.       Esc  [   1   K
  211.       033 133 061 113
  212.     Complete line
  213.       Esc  [   2   K
  214.       033 133 062 113
  215.   Erase in display
  216.     End of screen (including cursor position)
  217.          Esc  [   J
  218.          033 133 112
  219.       Or Esc  [   0   J
  220.          033 133 060 112
  221.     Beginning of screen (including cursor position)
  222.       Esc  [   1   J
  223.       033 133 061 112
  224.     Complete display
  225.       Esc  [   2   J
  226.       033 133 062 112
  227.  
  228.  
  229. Computer editing
  230.   Delete characters (<n> characters right from cursor
  231.     Esc  [ <n> P
  232.     033 133   120
  233.   Inser line (<n> lines)
  234.     Esc  [ <n> L
  235.     033 133   114
  236.   Delete line (<n> lines)
  237.     Esc  [ <n> M
  238.     033 133   115
  239.  
  240.  
  241. Printing
  242.   Esc  [ <c> i
  243.   033 133    151
  244.  
  245.   Where <c> is
  246.       ''= Same as '0'
  247.      '0'= Prints screen (full or scroll region)
  248.      '4'= Printer controller off
  249.      '5'= Printer controller on (Print all received chars to printer)
  250.     '?1'= Print cursor line
  251.     '?4'= Auto print off
  252.     '?5'= Auto print on (Prints line to printer when you exit from it)
  253.  
  254.  
  255. Reports
  256.   Device status
  257.     Esc  [ <c> n
  258.     033 133   156
  259.  
  260.   Where <c> is
  261.       '0'=Response Ready, no malfunctions detected
  262.       '3'=Malfunction, error in self-test.
  263.       '5'=Status report request
  264.       '6'=Request cursor position.
  265.     '?10'=Response to printer status request, All ok.
  266.     '?11'=Response to printer status request, Printer is not ready.
  267.     '?13'=Response to printer status request, No printer.
  268.     '?15'=Status report request from printer
  269.  
  270.   Cursor position raport (Response to request cursor position)
  271.     Esc  [ <n1> ; <n2> R
  272.     033 133    073    122
  273.   Request terminal to identify itself (esc Z may not be supported in future)
  274.     Esc  [   c
  275.     033 133 143
  276.     Esc  [   0   c
  277.     033 133 060 143
  278.     Esc  Z
  279.     033 132
  280.   Response to terminal identify (VT102)
  281.     Esc  [   ?   6   c
  282.     033 133 077 066 143
  283.  
  284.  
  285. Reset to initial state
  286.   Esc  c
  287.   033 143
  288.  
  289.  
  290. Tests
  291.   Invoke confidence test
  292.     Esc  [   2   ; <n> y
  293.     033 133 062 073   171
  294.  
  295.   Where <n> is
  296.      '1'= Power-up test
  297.      '2'= Data loopback test
  298.      '4'= EIA loopback test
  299.      '9'= Power-up tests (continuously)
  300.     '10'= Data loopback tests (continuously)
  301.     '12'= EIA loopback tests (continuously)
  302.     '16'= Printer loopback test
  303.     '24'= Printer loopback tests (continuously)
  304.  
  305.  
  306. Screen adjustments
  307.   Esc  #   8
  308.   033 043 070
  309.  
  310.  
  311. Keyboard indicator
  312.   Led L1 off
  313.     Esc  [   0   q
  314.     033 133 060 181
  315.   Led L1 on
  316.     Esc  [   1   q
  317.     033 133 061 181
  318.  
  319.  
  320.  
  321. VT52 sequences
  322.   Ansi mode
  323.     Esc  <
  324.     033 074
  325.   Cursor positioning
  326.     Up    Esc  A
  327.           033 101
  328.     Down  Esc  B
  329.           033 102
  330.     Right Esc  C
  331.           033 103
  332.     Left  Esc  D
  333.           033 104
  334.     Home  Esc  H
  335.           033 110
  336.     Direct cursor address
  337.       Esc  Y  <line+040> <columns+040>
  338.       033 131
  339.     Reverse linefeed       Esc  I
  340.                            033 111
  341.     Erase to end of line   Esc  K
  342.                            033 113
  343.     Erase to end of screen Esc  J
  344.                            033 112
  345.     Auto print on          Esc  ^
  346.                            033 136
  347.     Auto print off         Esc   
  348.                            033 137
  349.     Printer controller on  Esc  W
  350.                            033 127
  351.     Printer controller off Esc  X
  352.                            033 130
  353.     Print cursor line      Esc  V
  354.                            033 135
  355.     Print screen           Esc  ]
  356.                            033 135
  357.     Indentify request      Esc  Z
  358.                            033 132
  359.     Response to indetify   Esc  /   Z
  360.      request (VT52)        033 057 132
  361.     Special charset (same  Esc  F
  362.      as line draw in VT102 033 106
  363.     Normal char set        Esc  G
  364.                            033 107
  365.  
  366.  
  367. Control characters
  368.   000 = Null (fill character)
  369.   003 = ETX (Can be selected half-duplex turnaround char)
  370.   004 = EOT (Can be turnaround or disconnect char, if turn, then DLE-EOT=disc.)
  371.   005 = ENQ (Transmits answerback message)
  372.   007 = BEL (Generates bell tone)
  373.   010 = BS  (Moves cursor left)
  374.   011 = HT  (Moves cursor to next tab)
  375.   012 = LF  (Linefeed or New line operation)
  376.   013 = VT  (Processed as LF)
  377.   014 = FF  (Processed as LF, can be selected turnaround char)
  378.   015 = CR  (Moves cursor to left margin, can be turnaround char)
  379.   016 = SO  (Selects G1 charset)
  380.   017 = SI  (Selects G0 charset)
  381.   021 = DC1 (XON, causes terminal to continue transmit)
  382.   023 = DC3 (XOFF, causes terminal to stop transmitting)
  383.   030 = CAN (Cancels escape sequence)
  384.   032 = SUB (Processed as CAN)
  385.   033 = ESC (Processed as sequence indicator)
  386.  
  387.